
<form name="editForm" role="form" novalidate ng-submit="vm.save()">

	<div class="modal-header">
		<button type="button" class="close" data-dismiss="modal"
			aria-hidden="true" ng-click="vm.clear()">&times;</button>
		<h4 class="modal-title" id="myAddressLabel"
			data-translate="milkbeeApp.address.home.createOrEditLabel">Create
			or edit a Address</h4>
	</div>
	<div class="modal-body">
		<jhi-alert-error></jhi-alert-error>
		<div class="form-group" ng-show="vm.address.id">
			<label for="id" data-translate="global.field.id">ID</label> <input
				type="text" class="form-control" id="id" name="id"
				ng-model="vm.address.id" readonly />
		</div>
		<div class="form-group">
			<label class="control-label"
				data-translate="milkbeeApp.address.province" for="field_province">Province</label>
			<input type="hidden" class="form-control" name="province"
				id="field_province" ng-model="vm.address.province" />
			<select class="form-control" name="province" id="field_province"
				ng-options="item as item.name for item in vm.provinces"
				ng-change="vm.provinceChange(vm.province.id)" ng-model="vm.province">
			</select>
		</div>
		<div class="form-group">
			<label class="control-label" data-translate="milkbeeApp.address.city"
				for="field_city">City</label> <input type="hidden"
				class="form-control" name="city" id="field_city"
				ng-model="vm.address.city" /> <select
				class="form-control" name="city" id="field_city"
				ng-options="item as item.name for item in vm.cities"
				ng-change="vm.cityChange(vm.city.id)" ng-model="vm.city">
			</select>
		</div>
		<div class="form-group">
			<label class="control-label"
				data-translate="milkbeeApp.address.county" for="field_county">County</label>
			<input type="hidden" class="form-control" name="county"
				id="field_county" ng-model="vm.address.county" />
			<select class="form-control" name="county" id="field_county"
				ng-options="item as item.name for item in vm.counties"
				ng-change="vm.countyChange(vm.county.id)" ng-model="vm.county">
			</select>
		</div>
		<div class="form-group">
			<label class="control-label"
				data-translate="milkbeeApp.address.detail" for="field_detail">Detail</label>
			<input type="text" class="form-control" name="detail"
				id="field_detail" ng-model="vm.address.detail" />
		</div>
		<div class="form-group">
			<label class="control-label"
				data-translate="milkbeeApp.address.telephone" for="field_telephone">Telephone</label>
			<input type="text" class="form-control" name="telephone"
				id="field_telephone" ng-model="vm.address.telephone" />
		</div>

		<div class="form-group">
			<label class="control-label" data-translate="milkbeeApp.address.name"
				for="field_name">Name</label> <input type="text"
				class="form-control" name="name" id="field_name"
				ng-model="vm.address.name" />
		</div>

	</div>
	<div class="modal-footer">
		<button type="button" class="btn btn-default" data-dismiss="modal"
			ng-click="vm.clear()">
			<span class="glyphicon glyphicon-ban-circle"></span>&nbsp;<span
				data-translate="entity.action.cancel">Cancel</span>
		</button>
		<button type="submit" ng-disabled="editForm.$invalid || vm.isSaving"
			class="btn btn-primary">
			<span class="glyphicon glyphicon-save"></span>&nbsp;<span
				data-translate="entity.action.save">Save</span>
		</button>
	</div>
</form>
